The HTML markup for a <LABEL>
element on this Web page includes an embedded script. Embedded scripts cannot be placed within a <LABEL>
element.
To correct this error
<LABEL>
element to another location in the HTML markup, or delete the script.You can then continue to edit the page in either HTML view or Design view.
Example
To run function myFunction()
when the mouse event onClick
is received by label myLabel
:
FOR
attribute whose value is an element ID
(FOR="ElementID"
) within the opening tag of myLabel
- or -
define an .htmlFor
property MyLabel.htmlFor="ElementID"
within a SCRIPT.
MyFunction()
as the onClick
event handler within the opening tag of the HTML element identified by that "ElementID":
<OtherElement ID="ElementID" onClick="MyFunction()">
When MyLabel
receives the onClick
event, this event will bubble through to the OtherElement
to which MyLabel
is bound. This OtherElement
will run MyFunction()
as its onClick
event handler.